﻿(function() {
  var __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

  this.AdminUserRoutes = (function(_super) {

    __extends(AdminUserRoutes, _super);

    function AdminUserRoutes() {
      return AdminUserRoutes.__super__.constructor.apply(this, arguments);
    }

    AdminUserRoutes.prototype.routes = {
      "Users/Create": "Create",
      "Users/Edit*path": "Edit",
      "Users/Listing*path": "Listing",
      "Users/Index": "Listing",
      "Users": "Listing"
    };

    AdminUserRoutes.prototype.Create = function() {
      var model, view;
      model = new AdminUserCreateModel();
      view = new AdminUserCreateView({
        model: model
      });
      return view.render();
    };

    AdminUserRoutes.prototype.Edit = function(path) {
      var model, view;
      model = new AdminUserEditModel();
      model.set("UserId", Url.GetParameterByName("UserId"));
      return view = new AdminUserEditView({
        model: model
      });
    };

    AdminUserRoutes.prototype.Listing = function() {
      var model, view;
      model = new AdminUserListingModel();
      model.FillModelFromUrl();
      return view = new AdminUserListingView({
        model: model
      });
    };

    return AdminUserRoutes;

  })(Backbone.Router);

}).call(this);
